﻿.fui-OverlayDrawer__backdrop {
    will-change: opacity, visibility;
    transition-timing-function: var(--curveEasyEase);
    transition-property: opacity, visibility;
    opacity: 0;
    transition-duration: var(--durationGentle);
    inset: 0px;
    position: fixed;
    background-color: rgba(0, 0, 0, 0.4);
    display: flex;
    z-index: var(--zIndexDrawerBackdrop);
    visibility: hidden;

    &.fui-OverlayDrawer__backdrop-show {
        opacity: 1;
        visibility: visible;
    }
}

.fui-OverlayDrawer {
    --fui-Drawer--size: 320px;
    box-shadow: var(--shadow64);
    opacity: 0;
    will-change: transform, box-shadow, opacity, visibility;
    transition-property: transform, box-shadow, opacity, visibility;
    transition-duration: var(--durationGentle);
    overflow: hidden;
    max-width: 100vw;
    height: auto;
    max-height: 100vh;
    box-sizing: border-box;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    background-color: var(--colorNeutralBackground1);
    color: var(--colorNeutralForeground1);
    position: fixed;
    visibility: hidden;
    display: flex;
    z-index: var(--zIndexDrawer);

    &.fui-OverlayDrawer-show {
        opacity: 1;
        visibility: visible;
        transform: translate3d(0px, 0px, 0px);
    }

    &-start {
        top: 0;
        bottom: 0;
        left: 0;
        right: auto;
        width: var(--fui-Drawer--size);
        transform: translate3D(calc(var(--fui-Drawer--size) * -1), 0, 0);
        border-right-width: var(--strokeWidthThin);
        border-right-style: solid;
        border-right-color: var(--colorTransparentStroke);
    }

    &-end {
        top: 0;
        bottom: 0;
        left: auto;
        right: 0;
        width: var(--fui-Drawer--size);
        transform: translate3D(calc(var(--fui-Drawer--size) * 1), 0, 0);
        border-left-width: var(--strokeWidthThin);
        border-left-style: solid;
        border-left-color: var(--colorTransparentStroke);
    }

    &-top {
        top: 0;
        bottom: auto;
        right: 0;
        left: 0;
        height: var(--fui-Drawer--size);
        max-height: 100%;
        transform: translate3D(0, calc(var(--fui-Drawer--size) * -1), 0);
        border-bottom-width: var(--strokeWidthThin);
        border-bottom-style: solid;
        border-bottom-color: var(--colorTransparentStroke);
    }

    &-bottom {
        top: auto;
        bottom: 0;
        right: 0;
        left: 0;
        height: var(--fui-Drawer--size);
        max-height: 100%;
        transform: translate3D(0, calc(var(--fui-Drawer--size) * 1), 0);
        border-top-width: var(--strokeWidthThin);
        border-top-style: solid;
        border-top-color: var(--colorTransparentStroke);
    }

    .fui-DrawerHeader {
        padding-top: var(--spacingVerticalXXL);
        padding-right: var(--spacingHorizontalXXL);
        padding-bottom: var(--spacingVerticalS);
        padding-left: var(--spacingHorizontalXXL);
        column-gap: var(--spacingHorizontalS);
        row-gap: var(--spacingHorizontalS);
        width: 100%;
        max-width: 100%;
        align-self: stretch;
        display: flex;
        align-items: center;
        justify-content: space-between;
        box-sizing: border-box;

        .fui-DrawerHeaderTitle {
            column-gap: var(--spacingHorizontalS);
            justify-content: space-between;
            align-items: center;
            display: flex;
        }
    }

    .fui-DrawerBody {
        margin: -1px 0px;
        padding-top: 1px;
        padding-right: var(--spacingHorizontalXXL);
        padding-bottom: 1px;
        padding-left: var(--spacingHorizontalXXL);
        overflow: auto;
        flex: 1 1 0px;
        align-self: stretch;
        background-image: linear-gradient(to top, var(--colorNeutralBackground1), var(--colorNeutralBackground1)),linear-gradient(to top, var(--colorNeutralBackground1), var(--colorNeutralBackground1)),linear-gradient(to top, var(--colorNeutralStroke1), var(--colorNeutralBackground1)),linear-gradient(to bottom, var(--colorNeutralStroke1), var(--colorNeutralBackground1));
        background-position: center bottom, center top, center bottom, center top;
        background-repeat: no-repeat;
        background-color: var(--colorNeutralBackground1);
        background-size: 100% 2px, 100% 2px, 100% 1px, 100% 1px;
        background-attachment: local, local, scroll, scroll;
    }

    .fui-DrawerFooter {
        padding-top: var(--spacingVerticalXXL);
        padding-right: var(--spacingHorizontalXXL);
        padding-bottom: var(--spacingVerticalS);
        padding-left: var(--spacingHorizontalXXL);
        row-gap: var(--spacingHorizontalS);
        width: 100%;
        max-width: 100%;
        align-self: stretch;
        display: flex;
        align-items: center;
        justify-content: space-between;
        box-sizing: border-box;
    }
}
